home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 October: Mac OS SDK / Dev.CD Oct 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / PInterfaces / TSMTE.p < prev    next >
Encoding:
Text File  |  1997-08-12  |  3.1 KB  |  132 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        TSMTE.p
  3.  
  4.      Contains:    Text Services Managerfor TextEdit Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    Universal Interfaces 3.0.1
  8.  
  9.      Copyright:    ©1991-1997 Apple Technology, Inc. All rights reserved.
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT TSMTE;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __TSMTE__}
  28. {$SETC __TSMTE__ := 1}
  29.  
  30. {$I+}
  31. {$SETC TSMTEIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __TEXTEDIT__}
  35. {$I TextEdit.p}
  36. {$ENDC}
  37. {$IFC UNDEFINED __DIALOGS__}
  38. {$I Dialogs.p}
  39. {$ENDC}
  40. {$IFC UNDEFINED __APPLEEVENTS__}
  41. {$I AppleEvents.p}
  42. {$ENDC}
  43. {$IFC UNDEFINED __TEXTSERVICES__}
  44. {$I TextServices.p}
  45. {$ENDC}
  46. {  #include <Gestalt.i> }
  47.  
  48.  
  49.  
  50. {$PUSH}
  51. {$ALIGN MAC68K}
  52. {$LibExport+}
  53.  
  54. {  signature, interface types }
  55.  
  56. CONST
  57.     kTSMTESignature                = 'tmTE';
  58.     kTSMTEInterfaceType            = 'tmTE';
  59.     kTSMTEDialog                = 'tmDI';
  60.  
  61.  
  62. {  update flag for TSMTERec }
  63.     kTSMTEAutoScroll            = 1;
  64.  
  65.  
  66. {  callback procedure definitions }
  67.  
  68.  
  69. TYPE
  70.     TSMTEPreUpdateProcPtr = ProcPtr;  { PROCEDURE TSMTEPreUpdate(textH: TEHandle; refCon: LONGINT); }
  71.  
  72.     TSMTEPostUpdateProcPtr = ProcPtr;  { PROCEDURE TSMTEPostUpdate(textH: TEHandle; fixLen: LONGINT; inputAreaStart: LONGINT; inputAreaEnd: LONGINT; pinStart: LONGINT; pinEnd: LONGINT; refCon: LONGINT); }
  73.  
  74.     TSMTEPreUpdateUPP = UniversalProcPtr;
  75.     TSMTEPostUpdateUPP = UniversalProcPtr;
  76.  
  77.  
  78. {  data types }
  79.     TSMTERecPtr = ^TSMTERec;
  80.     TSMTERec = RECORD
  81.         textH:                    TEHandle;
  82.         preUpdateProc:            TSMTEPreUpdateUPP;
  83.         postUpdateProc:            TSMTEPostUpdateUPP;
  84.         updateFlag:                LONGINT;
  85.         refCon:                    LONGINT;
  86.     END;
  87.  
  88.     TSMTERecHandle                        = ^TSMTERecPtr;
  89.     TSMDialogRecordPtr = ^TSMDialogRecord;
  90.     TSMDialogRecord = RECORD
  91.         fDialog:                DialogRecord;
  92.         fDocID:                    TSMDocumentID;
  93.         fTSMTERecH:                TSMTERecHandle;
  94.         fTSMTERsvd:                ARRAY [0..2] OF LONGINT;                {  reserved }
  95.     END;
  96.  
  97.     TSMDialogPeek                        = ^TSMDialogRecord;
  98.  
  99. CONST
  100.     uppTSMTEPreUpdateProcInfo = $000003C0;
  101.     uppTSMTEPostUpdateProcInfo = $000FFFC0;
  102.  
  103. FUNCTION NewTSMTEPreUpdateProc(userRoutine: TSMTEPreUpdateProcPtr): TSMTEPreUpdateUPP;
  104.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  105.     INLINE $2E9F;
  106.     {$ENDC}
  107.  
  108. FUNCTION NewTSMTEPostUpdateProc(userRoutine: TSMTEPostUpdateProcPtr): TSMTEPostUpdateUPP;
  109.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  110.     INLINE $2E9F;
  111.     {$ENDC}
  112.  
  113. PROCEDURE CallTSMTEPreUpdateProc(textH: TEHandle; refCon: LONGINT; userRoutine: TSMTEPreUpdateUPP);
  114.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  115.     INLINE $205F, $4E90;
  116.     {$ENDC}
  117.  
  118. PROCEDURE CallTSMTEPostUpdateProc(textH: TEHandle; fixLen: LONGINT; inputAreaStart: LONGINT; inputAreaEnd: LONGINT; pinStart: LONGINT; pinEnd: LONGINT; refCon: LONGINT; userRoutine: TSMTEPostUpdateUPP);
  119.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  120.     INLINE $205F, $4E90;
  121.     {$ENDC}
  122. {$ALIGN RESET}
  123. {$POP}
  124.  
  125. {$SETC UsingIncludes := TSMTEIncludes}
  126.  
  127. {$ENDC} {__TSMTE__}
  128.  
  129. {$IFC NOT UsingIncludes}
  130.  END.
  131. {$ENDC}
  132.